package entities;

import java.awt.MouseInfo;
import java.awt.Point;
import java.awt.Rectangle;
import java.io.IOException;

public class MyRectangle extends Rectangle {
	
	private static final long serialVersionUID = 1L;
	public double xTop;
	public double yTop;
	public double width;
	public double height;
	
	public MyRectangle()
	{
		super();
	}

	public void set()
	{
		Point mousepoint = MouseInfo.getPointerInfo().getLocation();
		xTop = mousepoint.x;
		yTop = mousepoint.y;
		
		try
		{
			System.in.read();
		} 
		catch (IOException e) 
		{
			e.printStackTrace();
		}
		
		mousepoint = MouseInfo.getPointerInfo().getLocation();
		width = mousepoint.x - xTop;
		height = mousepoint.y - yTop;
	}
}
